package com.zfc.life.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

/**
 * 七牛云配置类  绑定配置文件
 */
@Configuration
@PropertySource("classpath:config.properties")
public class QiNiuYunConfig {
    /**
     * 七牛云的访问密钥AccessKey
     */
    public static String  qiniuAccessKey;

    /**
     * 七牛云的密钥SecretKey
     */
    public static String qiniusecretKey;

    /**
     * 七牛云存储空间的名称
     */
    public static String qiniuBucketName;

    /**
     * 七牛云存储空间的图片访问域名
     */
    public static String qiniuImageDomain;

    public static String directory;

    @Value("${qiniuyun.qiniuAccessKey}")
    public void setQiniuAccessKey(String qiniuAccessKey) {
        this.qiniuAccessKey = qiniuAccessKey;
    }

    @Value("${qiniuyun.qiniusecretKey}")
    public void setQiniusecretKey(String qiniusecretKey) {
        this.qiniusecretKey = qiniusecretKey;
    }

    @Value("${qiniuyun.qiniuBucketName}")
    public void setQiniuBucketname(String qiniuBucketName) {
        this.qiniuBucketName = qiniuBucketName;
    }

    @Value("${qiniuyun.qiniuImageDomain}")
    public void setQiniuImageDomain(String qiniuImageDomain) {
        this.qiniuImageDomain = qiniuImageDomain;
    }

    @Value("${qiniuyun.directory}")
    public void setDirectory(String directory) {
        this.directory = directory;
    }
}
